﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using YasharEl.Infrastructure.PersistenceModel.NHibernate.Specifications;
using YasharEl.Infrastructure.Core.PersistenceModel.Users.Specifications;
using YasharEl.Infrastructure.Core.Personification;
using NHibernate.Criterion;
using YasharEl.Infrastructure.Core.Users;

namespace YasharEl.Infrastructure.Core.PersistenceModel.NHibernate.Users.Specifications
{
    public class UserCriteriaSpecification : CriteriaSpecification<IUser, long>, IUserSpecification
    {
        public IUserSpecification WithIdentityNumber(IsraelIdentityNumber identityNumber)
        {
            this.Criteria.Add(Expression.Eq("UserIdentityId", identityNumber));
            return this;
        }
    }
}
